package com.ssyan.factory.absfactory.order;

import com.ssyan.factory.absfactory.*;

/**
 * @author ssyan
 * @Description TODO
 * @create 2021/8/28 0:14
 * @Version 1.0
 */
//这是一个工厂子类
public class LDFactory implements AbsFactory{
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
